﻿using System;
using System.Collections.Generic;
using System.Text;
using Pixysoft.Framework.XSchEmA;

namespace Pixysoft.Framework.Noebe.Orm.testdriven
{
    class tc_003
    {
        public void test()
        {
            string path = StringFilter.RegularPath(AppDomain.CurrentDomain.BaseDirectory) + "helloworld.mdb";

            XSchemaManager.AccessSchema.Schema.DropDatabase(null, path);

            XSchemaManager.AccessSchema.Schema.CreateDatabase(null, path);

            NoebeConfiguration config = new NoebeConfiguration();
            config.DatabaseType = DatabaseType.Access;
            config.Filename = path;

            new OrmSchema().Drop<Person>(config);

            new OrmSchema().Commit<Person>(config);
        }
    }
}
